var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  // 获取cookie
  let user = req.cookies['user']?JSON.parse(req.cookies['user']):{}
  res.render('index',{
    user
  });
});
router.get('/main', function(req, res, next) {
  res.render('home');
});

module.exports = router;
